import down.xiaoheihe.work.Response.orderR;
import down.xiaoheihe.work.Response.orderT;
import down.xiaoheihe.work.Service.service3;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Arrays;
import java.util.List;

import static org.junit.jupiter.api.Assertions.assertEquals;

@SpringBootTest
@AutoConfigureMockMvc
public class service3test extends BaseTest {
    @Autowired
    private service3 service3;

//    @Test
//    public void apiTest2() {
//        orderT orderT = service3.查询指定订单(1);
//        assertEquals(11, orderT.getPrice());
//        assertEquals("ROG幻14 2022款r7 6800 rx6700s笔记本华硕玩家国度幻14系列2022款，配备AMD-R7-6800HS，八核CPU 16G ddr5 4800MHz内存，独显rx6700s，显存8G，1TB高速固态，14寸ips屏，2.5k分辨率，120hz，100%色域\"",
//                orderT.getDescription());
//        assertEquals(9998, orderT.getGuarentee());
//        assertEquals(Arrays.asList("https://down.xiaoheihe.work/api/image/asdad/606sd.jpg", "https://down.xiaoheihe.work/api/image/asdad/606sd.jpg"), orderT.getUrls());
//        assertEquals(1, orderT.getStatus());
//    }
    //用户查询

//    @Test
//    public void apiTest1() {
//        List<orderR> res = service3.查询我的所有订单(1);
//        assertEquals(1, res.size());
//        orderR orderR = res.get(0);
//        assertEquals("ROG幻14 2022款r7 6800 rx6700s笔记本华硕玩家国度幻14系列2022款，配备AMD-R7-6800HS，八核CPU 16G ddr5 4800MHz内存，独显rx6700s，显存8G，1TB高速固态，14寸ips屏，2.5k分辨率，120hz，100%色域",
//                orderR.getDescription());
//        assertEquals(1, orderR.getId());
//        assertEquals("https://down.xiaoheihe.work/api/image/asdad/606sd.jpg", orderR.getUrl());
//        assertEquals(11, orderR.getPrice());
//    }
}
